package dev.werillib

import android.content.Context
import dev.werillib.net.NetManager
import dev.werillib.utils.Log
import dev.werillib.utils.StringUtil
import okhttp3.Interceptor

object WerilLib {
    @JvmStatic
    fun init(
        context: Context,
        debug: Boolean = true,
        baseUrl: String? = null,
        debugUrl: String? = null,
        vararg interceptor: Interceptor
    ) {
        //初始化日志工具
        Log().init(debug)
        if (!StringUtil.isEmpty(baseUrl) && !StringUtil.isEmpty(debugUrl)) {
            NetManager.init(context, baseUrl!!, debugUrl!!, debug, *interceptor)
        }
    }
}